package com.halflife.framework.generator.template.mapper;

/**
 * Created by zhaoyf on 2018/6/18.
 */
public class DeleteByPrimaryKeyAnalysis extends BaseAnalysis {
    public DeleteByPrimaryKeyAnalysis(Class clazz) {
        super(clazz);
    }

    @Override
    protected void setPrefix() {
        this.xmlStr.append("<delete id=\"deleteByPrimaryKey\" parameterType=\"java.lang.Integer\">\n");
        this.xmlStr.append("\t delete from `"+this.tableName+"`\n" );
        this.xmlStr.append("\t where id = #{id,jdbcType=INTEGER}\n");


    }

    @Override
    protected String getValue1(CustomField customField) {

        return "";
    }



    ;

    protected void setSuffix() {
        this.xmlStr.append(" </delete>");
    }

    ;
}
